// 导入
import './css/index.css'
import './less/index.less'
import './assets/fonts/iconfont.css'
import runImg from './assets/1.gif'
import logImg from './assets/logo_small.png'

// 创建结构 追加元素
const i = document.createElement('i')
i.classList.add('iconfont', 'icon-qq')
document.body.appendChild(i)

const img = document.createElement('img')
img.src = logImg
document.body.appendChild(img)

// 获取奇数项目的li 和 偶数项目的li
const odd = document.querySelectorAll('li:nth-child(odd)')
const even = document.querySelectorAll('li:nth-child(even)')
// console.log(even)

// 遍历伪数组 给li添加类名 
for (let i = 0; i < odd.length; i++) {
  odd[i].style.color = 'red'
}
for (let i = 0; i < even.length; i++) {
  even[i].style.color = 'green'
}
